package com.family.pedigree.domain;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 个人保修信息表
 * </p>
 *
 * @author forever
 * @since 2025-01-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("family_user_insurance")
public class FamilyUserInsurance implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户信息id
     */
    @NotNull(message = "用户信息不能为空")
    private Long infoId;

    /**
     * 保险类型
     */
    private String insuranceType;

    /**
     * 缴纳金额
     */
    @NotNull(message = "缴纳金额不能为空")
    private BigDecimal insuranceAmount;

    /**
     * 年份
     */
    @NotNull(message = "年份不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate particularYear;


}
